<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script>
function runTest() {
    var target = document.getElementById('target');
    debug('Calling target.focus()');
    target.addEventListener('focus', function(e) {
        debug('focus received by ' + target);
    });
    target.focus();
    shouldBe('document.activeElement', 'target');
}
</script>
</head>
<body onload="runTest()">
<label id="target" contenteditable>I'm editable.</label>
<button id="button">Just a button</button>
</body>
</html>

